<!DOCTYPE html>
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
	<meta content="telephone=no" name="format-detection"/>
	<title>test=</title>

</head>
<body>
	





	<script>
		var date = new Date();
		console.log(date.getTime());
		var date2 = new Date('1987/05/10');
		console.log(date2.getTime());
		console.log(date-date2);
		console.log('date2:'+date2);
		console.log(date2.getDay());
		console.log(date.getDay());
		console.log(date.getDate());
		console.log(date2.toLocaleString());
		console.log(date.toLocaleString());

		var dd = new Date();
        var x = dd.toLocaleString();
        var o = pasDate(x);
        console.log(o);
        console.log(x);



        function pasDate(da) {
                var yp = da.indexOf('年'),
               mp = da.indexOf('月'),
               dp = da.indexOf('日');
                var y = da.substr(0,yp),
               m = da.substr(yp + 1,mp - yp - 1),
               d = da.substr(mp + 1,dp - mp - 1);
                return [y,m,d];
            }
	</script>
</body>
</html>